﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="WorkTimeDate.aspx.cs" Inherits="WorkTime_WorkTimeDate" %>

<%@ Register Assembly="ZLTextBox" Namespace="BaseText" TagPrefix="cc1" %>
<%@ Register Src="../Control/DepartmentDList.ascx" TagName="DepartmentDList" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Titile" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="Server">
    <table cellpadding="0" cellspacing="5" class="TbSearch">
        <tr>
            <td style="width: 40px" valign="middle">
                <asp:Label ID="LLabel2" runat="server" Text="部门:" Width="30px"></asp:Label>
            </td>
            <td>
                <uc1:DepartmentDList ID="dptlist" runat="server" />
            </td>
            <td style="text-align: right">
                <span class="roundbtn">
                    <asp:LinkButton ID="Refresh" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;查 阅&nbsp;&nbsp;&nbsp;&nbsp;" OnClick="Button1_Click"></asp:LinkButton>
                </span>&nbsp;&nbsp;&nbsp;&nbsp; <span class="roundbtn">
                    <asp:LinkButton ID="BatchYear" runat="server" Text=" 工龄保存 " OnClick="BatchYear_Click" OnClientClick="return confirm('确认保存？');"></asp:LinkButton>
                </span>&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
    </table>
    <asp:GridView ID="wgvMaster" runat="server" Width="100%" AutoGenerateColumns="False"
        OnRowDataBound="wgvMaster_RowDataBound" CellPadding="5">
        <RowStyle BackColor="#EFF3FB" />
        <PagerSettings Mode="NumericFirstLast" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <Columns>
            <asp:BoundField DataField="EmployeeID" HeaderText="工号" SortExpression="EmployeeID">
                <ItemStyle Width="80px" />
            </asp:BoundField>
            <asp:BoundField DataField="EmpName" HeaderText="姓名" SortExpression="EmpName">
                <ItemStyle Width="100px" />
            </asp:BoundField>
            <asp:BoundField DataField="DepartmentName" HeaderText="部门" SortExpression="DepartmentName" />
            <asp:TemplateField HeaderText="工龄(年)" SortExpression="ADay">
                <ItemStyle Width="80px" />
                <ItemTemplate>
                    <asp:Label ID="AccTime" runat="server" Text="0"></asp:Label></ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="更新工龄(截至当月1日)" SortExpression="ADay" AccessibleHeaderText="截至本月1日(月)">
                <ItemStyle Width="150px" />
                <ItemTemplate>
                    <%--<infolight:webdatetimepicker id="AddAccTime" runat="server" caption="" dateformat="ShortDate">
                    </infolight:webdatetimepicker>--%>
                    <cc1:ZLTextBox ID="DoDay" Language="Chinese" runat="server" Width="80px" InputType="number"></cc1:ZLTextBox>月</ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="WorkTimeDate" DataFormatString="{0:yyyy-MM}" HeaderText="工龄开始时间(模拟)"
                NullDisplayText="未录入工龄">
                <ItemStyle Width="120px" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="入职时间" SortExpression="Accession">
                <ItemTemplate>
                    <asp:Label runat="server" Text='<%# Eval("Accession", "{0:yyyy-MM-dd}") %>' ID="Label3"></asp:Label></ItemTemplate>
                <ItemStyle Width="120px" />
            </asp:TemplateField>
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <PagerStyle BackColor="LightBlue" ForeColor="White" HorizontalAlign="Center" />
        <HeaderStyle BackColor="DeepSkyBlue" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" BorderColor="White" />
    </asp:GridView>
</asp:Content>
